package 你能构造出连续值的最大数目;

import java.util.Arrays;

/**
 * @Program:IntelliJ IDEA
 * @description:
 * @author:香蕉你个啵娜娜 l.h-p@qq.com
 * @create:2023-02-04 09:54
 **/

public class Solution {
    public int getMaximumConsecutive(int[] coins) {
        int res = 1;
        Arrays.sort(coins);
        for (int i : coins) {
            if (i>res){
                break;
            }
            res += i;
        }
        return res;
    }
}
